package zsh.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import zsh.domain.Account;

import java.math.BigDecimal;

@Mapper
public interface AccountMapper {
    @Update("update tb_account set money = money + #{money} where name = #{name}")
    void insertAccount(@Param("name") String name , @Param("money") BigDecimal money);
    @Update("update tb_account set money = money - #{money} where name = #{name}")
    void outAccount(@Param("name") String name , @Param("money") BigDecimal money);
}
